1. Field of the Invention
Embodiments of the invention generally relate to software management and, more specifically, to a method and apparatus for restructuring a software program hierarchy.
2. Description of the Related Art
Legacy software systems typically include a deep and complex interface file hierarchy. In such systems, one interface file may in turn include several other interface files and so on. Moreover, multiple implementation files can include the same interface file. This results in the same set of interface files being compiled repeatedly with each implementation file they are included in. As such, larger than required interface files will have a detrimental effect on compilation times and preprocessed code size.
Factors like adaptations due to market demand, internal debugging and maintenance, individual developer coding styles, and the like lead to increased software entropy. Software entropy is manifested in the form of false dependencies between interface and implementation files. There are several drawbacks of false dependencies. Notably, they increase the preprocessed code size due to inclusion of unnecessary program units. Fresh and incremental compilation times increases loading, parsing and compilation of unnecessarily included program units in each implementation file. These problems make the software system harder and costlier to maintain. In fact, it is the incremental compilation time that impacts the developer efficiency the most. An increase in incremental compile time amounts to practically equivalent stalling of development and testing time. This is directly proportional to increased cost in terms of developer salary, wastage of resources, etc. So there is a need to devise a scheme for restructuring the interfaces such that the program units are placed in the interfaces in a manner so that the false and redundant dependencies are minimized.
Existing approaches try to optimize the interfaces by translating the dependencies to a graph and then partitioning the graph so that only true dependencies are left and false dependencies are removed. The source code is then regenerated based on the true dependencies to achieve better cohesion and reduced coupling between the files. The major drawback of these approaches is unsupervised reorganization and regeneration of the code and header file hierarchy, which in a large productized environment is often impractical. The techniques provide no means by which user can control the extent of distortion that the overall software system will incur as part of the approach. Moreover, the techniques only work in a corrective and not in a prophylactic manner. Such techniques do not aid the user in deciding whether or not the placement of a new program unit during development will degrade the dependency structure. In addition, graph based algorithms are not very suitable for handling of large datasets.
Accordingly, there exists a need in the art for a method and apparatus for restructuring a software program hierarchy having implementation files and interface files that overcome the aforementioned deficiencies.